package com.qiji.video.mapper.extend;

import com.qiji.video.bean.Videos;
import com.qiji.video.bean.extend.FuzzyQuery_Video;
import com.qiji.video.bean.vo.LeaderboardVo;
import com.qiji.video.bean.vo.VideosAllVo;
import com.qiji.video.bean.vo.VideosSearchVo;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;
import java.util.List;
@Repository
public interface VideosExtendMapper {
    List<Videos> fuzzyEnquiryVideos(FuzzyQuery_Video fuzzyQuery_video);//要用一个更大的数据对象包含了分区信息才行
    //全网搜
    List<Videos> selectListByName(String name);
    //热门搜索
    List<Videos> hotsearch();
    //轮播图数据查询
    List<Videos> selectPartitioningByid(Integer id);
    boolean updateLikesByIdAdd(Integer vid);

    boolean updateLikesByIdReduce(Integer vid);

    boolean updateClicksById(Integer vid);

    Integer selectIsCollectByUVId(Integer userId, Integer vid);

    void deleteCollectByUVId(Integer userId, Integer vid);

    void addCollectByUVId(Integer userId, Integer vid, Timestamp nowTime);

    Integer selectISBrowsByUVId(Integer vid);

    void addBrowsByUVId(Integer userId, Integer vid, Timestamp nowTime);

    void updateBrowsByUVId(Integer userId, Integer vid, Timestamp nowTime);

    List<LeaderboardVo> selectLeaderboard(List<Integer> ids, Integer partitionId, Integer num);

    List<VideosSearchVo> hotSearch();

    List<VideosAllVo> selectVideosByName(String name);

    List<Videos> carouselSelect(Integer id);

    List<Videos> selectVideosByState0(Integer partitionId, Integer stateNum, Integer videoNum);

    List<Videos> selectVideosByState(Integer partitionId, Integer stateNum, Integer videoNum);
}

